﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

using AttributeRouting;
using AttributeRouting.Web.Mvc;
using Invoicing.Logic.Products;
using Invoicing.Model.Products;
namespace Invoicing.Web.Management.Areas.Products.Controllers
{
    [RouteArea("Products")]
    [RoutePrefix("Category")]
    [Authorize]
    public class ProductCategoryController : Controller
    {
        [Route("")]
        public ActionResult Index()
        {
            return View();
        }

        [Route("Edit/{id:int?}")]
        public ActionResult Edit(int id=0)
        {
            ProductCategoryModel model;
            if (id > 0)
                model = ProductCategoryLogic.GetModel(id);
            else
                model = new ProductCategoryModel();
            return PartialView(model);
        }
    }
}
